{extend name="default/base/base_seller" /}
{block name="seller_main"}
<!--当前活动已选择的参与商品-->
<form method="GET">
    <input type="hidden" value="{$Request.param.activity_id}" name="activity_id"/>
    <table class="dssc-default-table">
        <thead>
        <tr>
            <th class="w50"></th>
            <th class="w300 tl">{$Think.lang.store_activity_goods_name}</th>
            <th>{$Think.lang.pinjian_activity_apply_price}</th>
            <th class="w120">{$Think.lang.store_activity_confirmstatus}</th>
        </tr>
        </thead>
        <tbody>
        {notempty name="activitydetail_list"}
        {foreach name="activitydetail_list" item="v"}
        <tr class="bd-line">
            <td>
                <div class="pic-thumb"><a href="{:url('Goods/index',['goods_id'=>$v.goods_id])}" target="_blank"><img src="{:goods_cthumb($v.goods_image,240,session('store_id'))}"></a></div>
            </td>
            <td class="tl">
                <dl class="goods-name">
                    <dt><a target="_blank" href="{:url('Goods/index',['goods_id'=>$v.goods_id])}">{$v.goods_name}</a>
                    </dt>
                </dl>
            </td>
            <td>￥{:empty($activity_info['tasting_price']) ? '0.00' : $activity_info['tasting_price']}</td>
            <td>{if $v.state == '1'}
                {$Think.lang.store_activity_pass}
                {else /}
                {if $v.state == '0' || $v.state == '3'}
                {$Think.lang.store_activity_audit}
                {/if}
                {/if}
            </td>
        </tr>
        {/foreach}
        {else /}
        <tr>
            <td colspan="20" class="norecord">
                <div class="warning-option"><i class="iconfont">&#xe64c;</i><span>{$Think.lang.no_record}</span></div>
            </td>
        </tr>
        {/notempty}
        </tbody>
        <tfoot>
        <tr>
            <td colspan="20"></td>
        </tr>
        </tfoot>
    </table>
</form>
<!--选择参加活动的商品，勾选并提交平台审核-->
<div class="div-goods-select">
    <form method="GET">
        <input type="hidden" name="activity_id" value="{$Request.get.activity_id}"/>
        <table class="search-form">
            <tr>
                <th class="w250"><strong>{$Think.lang.pinjian_choose_products_event}</strong></th>
                <td class="w160"><input type="text" class="text w150" name="name" value="{$search.name}" placeholder="{$Think.lang.pinjian_search_product_names}"/></td>
                <td class="w70 tc">
                    <input type="submit" class="submit" value="{$Think.lang.store_activity_search}"/>
                </td>
                <td></td>
            </tr>
        </table>
    </form>
    <form method="POST" id="apply_form" action="{:url('Sellerpinjian/activity_apply_save')}">
        <input type="hidden" name="activity_id" value="{$Request.param.activity_id}"/>
        {notempty name="goods_list"}
        <div class="search-result">
            <ul class="goods-list">
                {foreach name="goods_list" item="goods"}
                <li>
                    <div class="goods-thumb">
                        <a href="{:url('Goods/index',['goods_id'=>$goods.goods_id])}" target="_blank">
                            <img alt="{$goods.goods_name}" title="{$goods.goods_name}" src="{:goods_cthumb($goods['goods_image'], 240, session('store_id'))}"/>
                        </a>
                    </div>
                    <dl class="goods-info">
                        <dt>
                            <input type="checkbox" value="{$goods.goods_id}" class="vm" name="item_id[]"/>
                            <label><a href="{:url('Goods/index',['goods_id'=>$goods.goods_id])}" target="_blank">{$goods.goods_name}</a></label>
                        </dt>
                        <dd>{$Think.lang.pinjian_sales_price}：￥{:empty($activity_info['tasting_price']) ? '0.00' : $activity_info['tasting_price']}</dd>
                    </dl>
                </li>
                {/foreach}
                <div class="clear"></div>
            </ul>
        </div>
        <div class="pagination">{$show_page}</div>
        {else /}
        <div class="warning-option"><i class="iconfont">&#xe64c;</i><span>{$Think.lang.no_record}</span></div>
        {/notempty}
        {notempty name="goods_list"}
        <div class="bottom tc p10">
            <input id="submit_button" type="submit" value="{$Think.lang.store_activity_join_now}" class="submit">
        </div>
        {/notempty}
    </form>
</div>
<script>
    $(document).ready(function () {
        $('#apply_form').validate({
            submitHandler: function (form) {
                ds_ajaxpost('apply_form', 'url', "{:url('Sellerpinjian/index')}");
            },
        });
    });
</script>

{/block}
